﻿@using ENail.Portal.Web.Models
@model ENail.Portal.Web.Models.EmployeeViewModel

@{
    ViewBag.Title = "Employee Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


    @using (Html.BeginForm())
    {
        <table>
            <tr>
                <td><input type="button" value="Save" onclick="document.forms(0).submit()" /></td>
                <td><input type="button" value="Discard" onclick="document.location='@Url.Action("Index", "Employee")'" /></td>
                <td><input type="button" value="Delete" onclick="document.location='@Url.Action("Delete", "Employee", new { id = Model.Id })'" style="visibility:@(Model.Id == 0 ? "hidden" : "visible")" /></td>
            </tr>
        </table>
        
        <table>
            <tr>
                <td>@Html.ValidationSummary()</td>
                <td></td>
            </tr>
            <tr>
                <td>FirstName</td>
                <td>@Html.TextBoxFor(x=>x.FirstName)</td>
            </tr>
            <tr>
                <td>LastName</td>
                <td>@Html.TextBoxFor(x=>x.LastName)</td>
            </tr>
            <tr>
                <td>Birthday</td>
                <td>@Html.TextBoxFor(x=>x.BirthDay)</td>
            </tr>
            <tr>
                <td>Address</td>
                <td>@Html.TextBoxFor(x=>x.Address)</td>
            </tr>
            <tr>
                <td>City</td>
                <td>@Html.TextBoxFor(x=>x.City)</td>
            </tr>
            <tr>
                <td>State</td>
                <td>@Html.TextBoxFor(x=>x.State)</td>
            </tr>
            <tr>
                <td>Zip</td>
                <td>@Html.TextBoxFor(x=>x.Zip)</td>
            </tr>
            <tr>
                <td>Country</td>
                <td>@Html.TextBoxFor(x=>x.Country)</td>
            </tr>
            <tr>
                <td>Phone</td>
                <td>@Html.TextBoxFor(x=>x.Phone)</td>
            </tr>
            <tr>
                <td>EnrollmentDay</td>
                <td>@Html.TextBoxFor(x=>x.EnrollmentDay)</td>
            </tr>
            <tr>
                <td>Commision Percentage</td>
                <td>@Html.TextBoxFor(x=>x.CommisionPercentage)</td>
            </tr>
            <tr>
                <td>Active</td>
                <td>@Html.CheckBoxFor(x=>x.IsActive)</td>
            </tr>
        </table>
    }    

